<include file="public@header"/>
<style type="text/css">
    .pic-list li {
        margin-bottom: 5px;
    }
</style>

</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="#"><a href="{:url('TechAdmin/index')}">老师信息展示</a></li>
        <li class="active"><a href="#">老师添加</a></li>
    </ul>
    <form action="{:url('TechAdmin/addteachadd')}" method="post" class="form-horizontal js-ajax-form margin-top-20">
        <div class="row">
            <div class="col-md-9">
                <table class="table table-bordered">
                    <tr>
                        <th style="text-align: center">用户名（必填）：</th>
                        <td>
                            <input type="text" name="username" class="form-control" placeholder="请输入用户名，只能用数字英文字母下划线组合" required >
                        </td>
                    </tr>
                    <tr>
                        <th style="text-align: center">密码（必填）：</th>
                        <td>
                            <input type="password" name="password" class="form-control" placeholder="请输入密码，6到12位" required >
                        </td>
                    </tr>
                    <tr>
                        <th style="text-align: center">重复密码（必填）：</th>
                        <td>
                            <input type="password" name="repassword" class="form-control" placeholder="请重复输入密码" required >
                        </td>
                    </tr>
                    <tr>
                        <th style="text-align: center">姓名（必填）：</th>
                        <td>
                            <input type="text" name="xingming" class="form-control" placeholder="请输入您的姓名" required>
                        </td>
                    </tr>
                    <tr>
                        <th style="text-align: center">年龄（必填）：</th>
                        <td>
                            <input type="text" name="age" class="form-control" placeholder="请输入您的年龄" required>
                        </td>
                    </tr>
                    <tr>
                        <th style="text-align: center">性别（必填）：</th>
                        <td>
                            <select name="sex">
                                <option value="0">女</option>
                                <option value="1">男</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <th style="text-align: center">所在区域（必填）：</th>
                        <td>
                            <textarea class="form-control" name="address" style="height:50px;" placeholder="请填入您所在的区域 例如:江苏 南京市" required></textarea>
                        </td>
                    </tr>
                    <tr>
                        <th style="text-align: center">行当（必填）：</th>
                        <td>
                            <input type="text" name="hangdang" class="form-control" placeholder="请输入您的擅长的行当"　required>
                        </td>
                    </tr>
                    <tr>
                        <th style="text-align: center">剧种（必填）：</th>
                        <td>
                            <select name="juzhong"　required>
                                <foreach name="juzhong" item="vo">
                                    <option value="{$vo.type}">{$vo.name}</option>
                                </foreach>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <th style="text-align: center">手机号码：</th>
                        <td>
                            <input type="text" name="phone" class="form-control" placeholder="请输入您的手机号"　required>
                        </td>
                    </tr>
                    <tr>
                        <th style="text-align: center">头像(375*175)</th>
                        <td>
                            <div>
                                <input type="hidden" name="touxiang[thumbnail]" class="form-control"
                                       id="js-thumbnail-input"　required>
                                <div>
                                    <a href="javascript:uploadOneImage('图片上传','#js-thumbnail-input');">
                                        <img src="__TMPL__/public/assets/images/default-thumbnail.png"
                                             id="js-thumbnail-input-preview"
                                             width="135" style="cursor: pointer"/>
                                    </a>
                                    <input type="button" class="btn btn-sm btn-cancel-thumbnail"
                                           onclick="$('#thumbnail-preview').attr('src','__TMPL__/public/assets/images/default-thumbnail.png');$('#thumbnail').val('');return false;"
                                           value="取消图片">
                                </div>
                            </div>
                        </td>
                    </tr>
                </table>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('ADD')}</button>
                        <a class="btn btn-default" href="{:url('TechAdmin/index')}">{:lang('BACK')}</a>
                    </div>
                </div>
            </div>

        </div>
    </form>
</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
<script>
    $(function(){
        $('.btn-cancel-thumbnail').click(function () {
            $('#js-thumbnail-input-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
            $('#js-thumbnail-input').val('');
        });
    });
</script>
</body>
</html>